﻿@model ElingOA6_Admin_DSJCJ.Model.Entity
 <script>

     //图片预览
     function previewImg() {
         var clientPhotoUploadObj = ASPxClientUploadControl.Cast("PhotoUpload");
         if (clientPhotoUploadObj.GetText() != "") {
             var ip = new ImagePreview($$("PhotoUpload_TextBox0_Input"), $$("previewImage"), {
             });
             ip.img.src = ImagePreview.TRANSPARENT;
             ip.preview();
             $("#previewImage").css("display", "block");
         }
         else {
             $("#previewImage").attr("src", "");
         }
         $('#previewImage').css("height", "100px");
         $('#previewImage').css("width", "100px");
     }


 </script>
<table class="tableForm">
    <tr>
        <th width="15%">
            系统编号:</th>
        <td class="tdClass">
            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FEntityNo";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(70);
                   settings.Text = Model.FEntityNo;
                   settings.ClientEnabled = false;
               }).GetHtml()
        </td>
    </tr>
    <tr>
        <th width="15%">
            系统标题: </th>
        <td class="tdClass">
            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FSysTitle";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(70);
                   settings.Text = Model.FSysTitle;
               }).GetHtml()
        </td>
    </tr>
    <tr>
        <th width="15%">
            单位名称:</th>
        <td class="tdClass">
            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FEntityName";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(70);
                   settings.Text = Model.FEntityName;
               }).GetHtml()
        </td>
    </tr>
    <tr>
        <th width="15%">
            单位简称:</th>
        <td class="tdClass">
            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FShortName";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(70);
                   settings.Text = Model.FShortName;
               }).GetHtml()
        </td>
    </tr>
    <tr>
        <th width="15%">
            负责人:</th>
        <td class="tdClass">
            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FLeader";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(70);
                   settings.Text = Model.FLeader;
               }).GetHtml()
        </td>
    </tr>
    <tr>
        <th width="15%">
            使用次数:</th>
        <td class="tdClass">
            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "fuseTimes";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(70);
                   settings.Text = Model.fuseTimes.HasValue ? Model.fuseTimes.Value.ToString() : "";
                   settings.ClientEnabled = false;
               }).GetHtml()
        </td>
    </tr>
    <tr>
        <th width="15%">
            最近登录IP: </th>
        <td class="tdClass">
            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FLastLoginIPAddr";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(70);
                   settings.Text = Model.FLastLoginIPAddr;
                   settings.ClientEnabled = false;
               }).GetHtml()
        </td>
    </tr>
    <tr>
        <th width="15%">
            最近登录ID: </th>
        <td class="tdClass">
            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FLogID";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(70);
                   settings.Text = Model.FLogID;
                   settings.ClientEnabled = false;
               }).GetHtml()
        </td>
    </tr>
    <tr>
        <th width="15%">
            最近访问时间: </th>
        <td class="tdClass">
            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FAccessDate";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(70);
                   settings.Text = Model.FAccessDate.HasValue ? Model.FAccessDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
                   settings.ClientEnabled = false;
               }).GetHtml()
        </td>
    </tr>
    <tr>
        <th width="15%">
            信息发布目录: </th>
        <td class="tdClass">
            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FPublishRoot";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(70);
                   settings.Text = Model.FPublishRoot;
                   settings.ClientEnabled = false;
               }).GetHtml()
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <fieldset style="padding: 3px; margin: 3px;">
                <legend style="color: #06c;">水印 </legend>
                <table class="tableFrom">
                    <tr>
                        <th width="15%">
                            水印类型: </th>
                        <td>
                            @Html.DevExpress().RadioButtonList(settings =>
          {
              settings.Name = "FWaterMarkCls";
              settings.Properties.RepeatLayout = System.Web.UI.WebControls.RepeatLayout.Table;
              settings.Properties.Style.Border.BorderWidth = 0;
              settings.Properties.RepeatDirection = System.Web.UI.WebControls.RepeatDirection.Horizontal;
              settings.Properties.RepeatColumns = 2;
          }).BindList(new List<SelectListItem> { new SelectListItem { Text = "文本", Value = "2" }, new SelectListItem { Text = "图片", Value = "1" } }).Bind(Model.FWaterMarkCls).GetHtml()
                        </td>
                    </tr>
                    <tr>
                        <th width="15%">
                            文本水印内容:</th>
                        <td>
                            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FTxtWaterMark";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(70);
                   settings.Text = Model.FTxtWaterMark;

               }).GetHtml()
                        </td>
                    </tr>
                    <tr>
                        <th width="15%">
                            水印图片:</th>
                        <td>
                            @Html.DevExpress().UploadControl(
            settings =>
            {
                settings.Name = "PhotoUpload";
                settings.BrowseButton.Text = "浏览";
                settings.ClearFileSelectionImage.ToolTip = "清除选择";
                settings.ValidationSettings.MaxFileSize = 20971520;
                settings.ValidationSettings.AllowedFileExtensions = new string[] { ".jpg", ".jpeg", ".jpe", ".gif", ".png" };
                settings.ShowUploadButton = false;
                settings.ClientSideEvents.TextChanged = "function(s,e){previewImg()}";
            }).GetHtml()
                            <img alt="" width="100px" height="100px" id="previewImage" src="@Model.FWaterMarkSvrFileName" />
                        </td>
                    </tr>
                </table>
            </fieldset>
        </td>
    </tr>
</table>
